package com.project.entity;

import java.io.Serializable;
import javax.persistence.*;

import java.sql.Date;
import java.util.Collection;
import java.util.List;


/**
 * The persistent class for the Account database table.
 * 
 */
@Entity
@Table(name="Account")
@NamedQueries({
	@NamedQuery(name = "Account.findIDImage", query = "SELECT acc.IDImage FROM Account acc WHERE acc.accID = :accID"),
})
public class Account implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="AccID")
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private int accID;

    @Lob()
	@Column(name="Address")
	private String address;

    @Lob()
	@Column(name="Answer")
	private String answer;

	@Column(name="Country")
	private String country;

	@Column(name="Email")
	private String email;

    @Lob()
    @Column(name="IDImage")
	private String IDImage;

	private String IDNumber;

	private boolean isVerified;

	@Column(name="Join_date",insertable=false)
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Date join_date;

	@Column(name="Name")
	private String name;

	@Column(name="Password")
	private String password;

	@Column(name="Phone")
	private String phone;

    @Lob()
	@Column(name="Question")
	private String question;

	@Column(name="State")
	private String state;

	@Column(name="Status",insertable=false)
	private boolean status;

	//bi-directional many-to-one association to Property
	@OneToMany(mappedBy="account")
	private List<Property> properties;

	//bi-directional many-to-one association to VisitLog
	@OneToMany(mappedBy="account",cascade = CascadeType.ALL)
	private List<VisitLog> visitLogs;


	
	
    public Account() {
    }

	

	public int getAccID() {
		return this.accID;
	}

	public void setAccID(int accID) {
		this.accID = accID;
	}

	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getAnswer() {
		return this.answer;
	}

	public void setAnswer(String answer) {
		this.answer = answer;
	}

	public String getCountry() {
		return this.country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getIDImage() {
		return this.IDImage;
	}

	public void setIDImage(String IDImage) {
		this.IDImage = IDImage;
	}

	public String getIDNumber() {
		return this.IDNumber;
	}

	public void setIDNumber(String IDNumber) {
		this.IDNumber = IDNumber;
	}

	public boolean getIsVerified() {
		return this.isVerified;
	}

	public void setIsVerified(boolean isVerified) {
		this.isVerified = isVerified;
	}

	public Date getJoin_date() {
		return this.join_date;
	}

	public void setJoin_date(Date join_date) {
		this.join_date = join_date;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getQuestion() {
		return this.question;
	}

	public void setQuestion(String question) {
		this.question = question;
	}

	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public boolean getStatus() {
		return this.status;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}

	public List<Property> getProperties() {
		return this.properties;
	}

	public void setProperties(List<Property> properties) {
		this.properties = properties;
	}
	
	public List<VisitLog> getVisitLogs() {
		return this.visitLogs;
	}

	public void setVisitLogs(List<VisitLog> visitLogs) {
		this.visitLogs = visitLogs;
	}
	
}